$(function(){
    $(document).on("click","#baiduSearch",function(){
        var $obj=$("#tt");
        addPanel($obj,"http://www.baidu.com","百度搜索");
    });
});


function addPanel($obj,src,title){
    $obj.tabs('add',{
        title: title,
        content: "<iframe src='"+src+"' allowTransparency='true' style='border:0;width:100%;height:99%;' frameBorder='0'></iframe>",
        closable: true
    });
}
function removePanel($obj){
    var tab =$obj.tabs('getSelected');
    if (tab){
        var index = $obj.tabs('getTabIndex', tab);
        $obj.tabs('close', index);
    }
}